<%@ include file="lib.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css/play.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta property="og:site_name" content="video-hot.appspot.com" />
<meta property="og:type" content="website" />

<meta property="og:url"
	content="http://video-hot.appspot.com/play/v/${video_object.embed_code}" />

<meta property="og:title" content="${video_object.title}" />

<meta property="og:description" content="${video_object.content.value}" />

<meta property="og:image" content="${video_object.image_Url}" />

<title>${video_object.title}</title>

<script>
	(function(d, s, id) {
		var js, fjs = d.getElementsByTagName(s)[0];
		if (d.getElementById(id))
			return;
		js = d.createElement(s);
		js.id = id;
		js.src = "//connect.facebook.net/vi_VN/sdk.js#xfbml=1&appId=756353207751887&version=v2.0";
		fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	var isMobile = {
		Android : function() {
			return navigator.userAgent.match(/Android/i);
		},
		BlackBerry : function() {
			return navigator.userAgent.match(/BlackBerry/i);
		},
		iOS : function() {
			return navigator.userAgent.match(/iPhone|iPad|iPod/i);
		},
		Opera : function() {
			return navigator.userAgent.match(/Opera Mini/i);
		},
		Windows : function() {
			return navigator.userAgent.match(/IEMobile/i);
		},
		any : function() {
			return (isMobile.Android() || isMobile.BlackBerry()
					|| isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
		}
	};
	if (isMobile.Android()) {
		location.href="market://details?id=vn.co.thn.android.videohot";
		location.href = "videohot://video_access_tokens?key=${video_object.embed_code}";
		//location.href = "intent://videohot/#Intent;scheme=video_access_tokens?key=${video_object.embed_code};package=vn.co.thn.android.videohot;end";
		//location.href="market://details?id=vn.co.thn.android.videohot";
		
	}
</script>
</head>
<body>
	<div id="top">
		<a
			href="https://play.google.com/store/apps/details?id=vn.co.thn.android.videohot"><img
			alt="" src="/img/logo.png"></a>
	</div>
	<div id="menu">
		<ul>
			<li><a href="/">Trang chủ</a></li>
			<li><a href="#">Chủ đề</a>
				<ul id="submenu">
					<c:forEach var="category" items="${categorylist}">
						<li><a href="/category/${category.key}">${category.name}</a></li>
					</c:forEach>
				</ul></li>
			<li><a href="/new">Mới nhất</a></li>
			<li><a href="/review">Xem nhiều nhất</a></li>
		</ul>
	</div>
	<div id="video">
		<iframe src="//www.youtube.com/embed/${video_object.embed_code}"
			frameborder="0" allowfullscreen></iframe>
	</div>
	<div id="title">${video_object.title}</div>
	<div id="like">
		<div class="fb-like"
			data-href="http://video-hot.appspot.com/play/v/${video_object.embed_code}"
			data-layout="standard" data-action="like" data-show-faces="true"
			data-share="true"></div>
	</div>
	<div id="comment">
		<div class="fb-comments"
			data-href="http://video-hot.appspot.com/play/v/${video_object.embed_code}"
			data-numposts="5" data-colorscheme="light" style="width:854px;"></div>
	</div>
	<div style="clear: left"></div>
	<div id="bottom">&copy; Video Hot</div>
</body>
</html>